/**   
 * Copyright © 2016 公司名. All rights reserved.
 * 
 * @Title: NoticeStatusEnum.java 
 * @Prject: LianniuWeb
 * @Package: com.lianniu.web.constants
 * @Description: TODO
 * @author: lzz   
 * @date: 2016年8月8日 下午12:41:56 
 * @version: V1.0   
 */
package com.lianniu.mgr.baseService.notice.enums;

/** 
 * @ClassName: NoticeStatusEnum 
 * @Description: TODO
 * @author: lzz
 * @date: 2016年8月8日 下午12:41:56  
 */
public enum NoticeStatusEnum {
    NOTLOOK("未读","00"),LOOKED("已读","01"),NOTDEL("未删除","0"),DELED("已删除","1");
    
    private String name;
    
    private String code;
    
    private  NoticeStatusEnum(String name,String code){
        this.name = name;
        this.code = code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    public static String getName(String code) {
        for (NoticeStatusEnum nes:NoticeStatusEnum.values()) {
            if (nes.code.equals(code)) {
                return nes.name;
            }
        }
        return null;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }
    public static String getCode(String name) {
        
        for(NoticeStatusEnum nse:NoticeStatusEnum.values()){
            if (nse.name.equals(name)) {
                return nse.code;
            }
        }
        return null;
    }
    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }
    
    
}
